﻿using System;

namespace WebTest.Core.Entities
{
    public class Address : BaseEntity
    {
        /// <summary>
        /// 地址的别名,如:家庭地址,工作地址
        /// </summary>
        public string Alias { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public string Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string City { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string Area { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string Detail { get; set; }

        public Address()
        {

        }
        public Address(string alias, string detail, string province = null, string city = null, string area = null)
        {
            Alias = alias ?? throw new ArgumentNullException(nameof(alias));
            Detail = detail ?? throw new ArgumentNullException(nameof(detail));
            Province = province;
            City = city;
            Area = area;
        }
    }
}
